const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('base_project_area', {
    objectid: {
      type: DataTypes.STRING(255),
      allowNull: false,
      primaryKey: true,
      field: 'OBJECTID'
    },
    featureguid: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'FEATUREGUID'
    },
    classcode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'CLASSCODE'
    },
    entityid: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'ENTITYID'
    },
    name: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'NAME'
    },
    type: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'TYPE'
    },
    boucode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'BOUCODE'
    },
    ghlid: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'GHLID'
    },
    jsdw: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'JSDW'
    },
    jsxmmc: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'JSXMMC'
    },
    jswz: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'JSWZ'
    },
    jsgm: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'JSGM'
    },
    sjdw: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'SJDW'
    },
    collectdt: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'COLLECTDT'
    },
    updatedate: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'UPDATEDATE'
    },
    archivedt: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'ARCHIVEDT'
    },
    datasource: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'DATASOURCE'
    },
    projectno: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'PROJECTNO'
    },
    surveyor: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'SURVEYOR'
    },
    inspector: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'INSPECTOR'
    },
    remark: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'REMARK'
    },
    'x坐标': {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'X坐标'
    },
    'y坐标': {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'Y坐标'
    },
    gcxmarea: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'GCXMAREA'
    },
    gcxmprice: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'GCXMPRICE'
    },
    projectplannum: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'PROJECTPLANNUM'
    },
    prjcode: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'PRJCODE'
    },
    state: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'STATE'
    },
    shapeLength: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'SHAPE_Length'
    },
    shapeArea: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'SHAPE_Area'
    }
  }, {
    sequelize,
    tableName: 'base_project_area',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "OBJECTID" },
        ]
      },
    ]
  });
};
